package com.swanclouds.redfish.common.redfish;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * 系统资源状态
 *  
 * @author 张立强
 */
@JsonRootName("Status")
public class Status implements com.swanclouds.model.common.redfish.Status {
    /**
     * 系统资源使能状态
     */
    @JsonProperty("State")
    private String state;

    /**
     * 系统资源健康状态
     */
    @JsonProperty("Health")
    private String health;

    @JsonProperty("HealthRollup")
    private String healthRollup;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getHealth() {
        return health;
    }

    @Override
    public String getHealthRollup() {
        return healthRollup;
    }

    public void setHealth(String health) {
        this.health = health;
    }

    public void setHealthRollup(String healthRollup) {
        this.healthRollup = healthRollup;
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "Status{" +
                "state='" + state + '\'' +
                ", health='" + health + '\'' +
                ", healthRollup='" + healthRollup + '\'' +
                '}';
    }
}
